
<div class="row" >
  <div class="col-md-6 col-sm-8 col-sm-push-2">
    <div class="one-form-header"></div>
    <div class="one-form-body">
        <form action="#" method="post" class="form form-horizontal" [formGroup]="accountForm" (ngSubmit)="onSubmit()" >
            <div class="form-group">
                <label for="accountName" class="col-sm-4 control-label">账户名:</label>
                <div class="col-sm-8">
                    <input type="hidden" id="userId" formControlName="id" name="id">
                    <input type="text" class="form-control" id="accountName" formControlName="accountName" required readonly>
                    <div *ngIf="formErrors.accountName" class="has-error">
                        <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.accountName}} </label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="account_add_pwd" class="col-sm-4 control-label">原始密码:</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" id="account_add_pwd" formControlName="password" required>
                    <div *ngIf="formErrors.password" class="has-error">
                        <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.password}} </label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="account_update_newpw" class="col-sm-4 control-label"  >新密码:</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" id="account_update_newpw" formControlName="newPassword" required >
                    <div *ngIf="formErrors.newPassword" class="has-error">
                        <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.newPassword}} </label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label for="account_add_repwd" class="col-sm-4 control-label"  >确认密码:</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" id="account_add_repwd" formControlName="confirmPassword" required >
                    <div *ngIf="formErrors.confirmPassword" class="has-error">
                        <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.confirmPassword}} </label>
                    </div>
                </div>
            </div>
          <div class="one-form-footer">
            <div class="pull-right">
              <button class="btn btn-default" type="reset" (click)="cancelUpdatePw()">取消</button>
              <button class="btn btn-success" type="submit" [disabled]="!accountForm.valid">提交</button>
            </div>
          </div>
        </form>
    </div>
  </div>
</div>
